<?php
require_once "jssdk.php";
$jssdk = new JSSDK("wx1c92a5a2b3b608e9", "1ee6a2fb1283409fabcc7b94d6b9e534");
$signPackage = $jssdk->GetSignPackage();
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-COMPATIBLE" content="IE-edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="css/nor.css" />
    <link rel="stylesheet" type="text/css" href="css/normalize.css" />
   <link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.mobile-1.4.5.js"></script>
    <!--<script type="text/javascript" src="js/touch.min.js"></script>-->
    <!--<script type="text/javascript" src="js/touch.js"></script>
    <script type="text/javascript" src="js/zepto.js"></script>-->
    <title>"狂野走BC"户外主题大趴</title>
    <script src="js/mui.min.js"></script>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <style>
    	#flesh-company img,
		#flesh-name img,
		#flesh-tel img
		{
			display: inline;
		}
        
        #jianada
        {
            max-width: 70%;
            height: auto;
        }

    </style>
    <script type="text/javascript" charset="utf-8">
    mui.init();
	touch.config
	({
	    tap: true,                  //tap类事件开关, 默认为true
	    doubleTap: true,            //doubleTap事件开关， 默认为true
	    hold: true,                 //hold事件开关, 默认为true
	    holdTime: 650,              //hold时间长度
	    swipe: true,                //swipe事件开关
	    swipeTime: 300,             //触发swipe事件的最大时长
	    swipeMinDistance: 18,       //swipe移动最小距离
	    swipeFactor: 5,             //加速因子, 值越大变化速率越快
	    drag: true,                 //drag事件开关
	    pinch: true                //pinch类事件开关
	});
    document.body.addEventListener('touchmove', function (event) {
        event.preventDefault(); }, false);
    </script>
<script type="text/javascript">
		var u = navigator.userAgent, app = navigator.appVersion;
		var magicNum = 0.3;
		var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
		//var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
		if(isAndroid)
		{
			magicNum = 0.30;
		}
	</script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body>
	<div class="container">
    <div class="st-container">
        <button id="next" class="text-center"> <img src="image/buttondown.png"/> </button>
        
        <div class="bbl text-center">
            <section class="bl" id="page1">
                <img class="con" src="image/1.jpg"  alt="" />
            </section>
            <section class="bl" id="page2"> 
                <img class="sc" id="qiuguang" src="image/qiuguang.png">
                <img class="sc" id="benpao" src="image/benpao.png">
              
                <img class="sc" id="quwang" src="image/quwang.png">
                <img class="sc" id="jianada" src="image/jianada.png">
                <img class="sc" id="quxian2" src="image/quxian.png">
                <img class="con" src="image/9.jpg"  alt="" />
            </section>
            <section class="bl" id="page4">
                 
                <img class="con" src="image/3.jpg"  alt="" />
            </section>
            <section class="bl" id="page5">
                <img class="con" src="image/8.jpg"  alt="" />
					<div class="goback"><img  src="image/buttonback.png"/></div>
            </section>
            <!--<section class="bl text-center" id="page6">-->

            		<!--<div class="btng text-center">-->
            			<!--<div id="flesh" class="text-center">  <img src="image/flesh.png"/> </div>-->
            			<!--<div id="assign" class="text-center">  <img src="image/assign.png"/> </div>-->
            			<!--<div id="reject" class="text-center"> <img src="image/reject.png"/> </div>-->
            		<!--</div>-->
            		<!--<img class="con" src="image/11.jpg"  alt="" />-->
            <!--</section>-->
            
        </div>
    </div>
</div>
    <script>
        var mywidth = document.documentElement.clientWidth;
        var myheight = document.documentElement.clientHeight;
        var qiuguang = $('#qiuguang');
        var benpao = $('#benpao');
        var quxian = $('#quxian');
        var quwang = $('#quwang');
        var jianada = $('#jianada');
        var quxian2 = $('#quxian2');
        var goback = $('.goback');
        qiuguang.css({top:myheight*0.0305 +'px',left:mywidth*0.34+'px'});
        benpao.css({top:myheight*magicNum +'px',left:mywidth*0.068+'px'});
        quxian.css({top:myheight*0.343 +'px',left:mywidth*0.510+'px'});
        quwang.css({top:myheight*0.4257 +'px',left:mywidth*0.08+'px'});
        quxian2.css({top:myheight*0.355 +'px',left:mywidth*0.510+'px'});
        jianada.css({top:myheight*0.4143 +'px',left:mywidth*0.0908+'px'});
        goback.css({left:0,top:0});


        document.body.addEventListener('touchmove', function (event) {
            event.preventDefault(); }, false);
        var i=0;
        var up=0;
        var f = document.getElementsByClassName('bll');
        $(function(){
            $(".bbl" ).on( "swipeup swipedown swipeleft swiperight", function( event ) {
                switch (i)
                {
                    case 0:
                    {
                        //$(".bbl").find("section").eq(0).slideUp("slow");
                        $(".bbl").addClass("upper1");
                        i++;
                        up=1;
                        break;
                    }
 //                   case 1:
   //                 {
 //                       qiuguang.animate({opacity:1});
  //                      benpao.delay(1000);
  //                      benpao.animate({opacity:1});
  //                      quxian.delay(1000);
  //                      quxian.animate({opacity:1});
  //                      quwang.delay(1000);
  //                      quwang.animate({opacity:1});
  //                      i++;
  //                      break;
         //           }
                    case 1:
                    {
                        qiuguang.animate({opacity:0});
                       // benpao.delay(500);
                        benpao.animate({opacity:0});
                      //  quxian.delay(500);
                        quxian.animate({opacity:0});
                      //  quwang.delay(500);
                        quwang.animate({opacity:0});
                        quxian2.animate({opacity:1});
                      //  jianada.delay(1000);
                        jianada.animate({opacity:1});
                        //$(".bbl").find("section").eq(1).delay(1000).slideUp("slow");
                        i++;
                        //up=1;
                        break;
                    }
                    case 2:
                    {
                        quxian2.animate({opacity:0});
                      //  jianada.delay(500);
                        jianada.animate({opacity:0});
                        $(".bbl").addClass("upper2");
                        //$(".bbl").find("section").eq(1).delay(1000).slideUp("slow");
						     // $('.goback').css({display:inline});
                        up=2;
                        i++;
                        break;
                    }
                    case 3:
                    {
                        $(".bbl").addClass("upper3");
						 // $('.goback').css({display:inline});
                       // $(".bbl").find("section").eq(2).slideUp("slow");
                        up=3;
                        i++;
                        break;
                    }
                    case 4:
                    {
                        location.href = "index.php";
                    }
                }
                //alert(i);
            })
        });
        $(function(){
            goback.on( "tap", function( event ) {
                switch(up)
                {
                    case 1:
                    {
                        $(".bbl").removeClass("upper1");
                        $(".bbl").removeClass("upper2");
                        $(".bbl").removeClass("upper3");
                        $(".bbl").addClass("upper0");
                        i=0;
                        break;
                    }
                    case 2:
                    {
                        $(".bbl").removeClass("upper1");
                        $(".bbl").removeClass("upper2");
                        $(".bbl").removeClass("upper3");
                        $(".bbl").addClass("upper1");
                        i=1;
                        break;
                    }
                    case 3:
                    {
                        $(".bbl").removeClass("upper1");
                        $(".bbl").removeClass("upper2");
                        $(".bbl").removeClass("upper3");
                        $(".bbl").addClass("upper2");
                        i=3;
                        break;
                    }
                }
//                $(".bbl").addClass('upper'+up-1);
//                alert(up-1);
//               // $(".bbl").find("section").eq(up).slideDown("slow");
//                //i--;
//                up--;

            })
        });
//        $(function(){
//            $("#flesh" ).on( "tap", function( event ) {
//                location.href = "flesh.html";
//            })
//        });
//        $(function(){
//            $("#assign" ).on( "tap", function( event ) {
//                location.href = "assign.html";
//            })
//        });
//        $(function(){
//            $("#reject" ).on( "tap", function( event ) {
//                location.href = "reject.html";
//            })
//        });
        $(function(){
            $("#goback" ).on( "tap", function( event ) {
                location.href = "index.php";
            })
        });


    </script>
<script >
    wx.config({
        debug: false,
        appId: '<?php echo $signPackage["appId"];?>',
        timestamp: <?php echo $signPackage["timestamp"];?>,
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>',
        jsApiList: [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
        ]
      });
      wx.ready(function () {
                wx.onMenuShareAppMessage({
                        title: '"狂野走BC"户外主题大趴邀请函',
                        desc: '11月22日，北京雁栖湖，加拿大BC省旅游局携手北京晨报、温哥华国际机场邀您一起HIGH！',
                        link: 'http://www.miugodigital.com/apps/travel/index.php',
                        imgUrl: 'http://7oxj36.com1.z0.glb.clouddn.com/travelshare.jpg'
                });

                wx.onMenuShareTimeline({
                        title: '"狂野走BC"户外主题大趴邀请函',
                        link: 'http://www.miugodigital.com/apps/travel/index.php',
                        imgUrl: 'http://7oxj36.com1.z0.glb.clouddn.com/travelshare.jpg'
                });
      });

</script>
</body>


</html>
